package com.aaa.ms;

import com.aaa.ms.config.RibbonConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * fileName:MarketApp
 * description:
 * author: Mr.Ge
 * createTime:2020/11/19 11:24
 * version:1.0.0
 */
@SpringBootApplication
@MapperScan("com.aaa.ms.dao")
@EnableTransactionManagement
@EnableEurekaClient
//name 可以随便起名称，ribbon客户端名称    configuration配置使用的负载均衡策略，可以自己编写
@RibbonClient(name = "marketRibbon",configuration = RibbonConfig.class)
@EnableCircuitBreaker  //开启断路器功能
public class MarketApp {
    public static void main(String[] args) {
        SpringApplication.run(MarketApp.class,args);
    }
}
